Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/software/sagemath/[name].tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Alert, Layout } from "antd";67import { SoftwareEnvNames } from "@cocalc/util/consts/software-envs";8import Footer from "components/landing/footer";9import Head from "components/landing/head";10import Header from "components/landing/header";11import Image from "components/landing/image";12import SoftwareLibraries from "components/landing/software-libraries";13import { Paragraph, Title } from "components/misc";14import A from "components/misc/A";15import { Customize, CustomizeType } from "lib/customize";16import { ExecutableDescription } from "lib/landing/render-envs";17import { withCustomizedAndSoftwareSpec } from "lib/landing/software-specs";18import {19ComputeComponents,20ComputeInventory,21SoftwareSpec,22} from "lib/landing/types";23import sageScreenshot from "public/features/sage-worksheet.png";24import { STYLE_PAGE } from "..";2526interface Props {27name: SoftwareEnvNames;28customize: CustomizeType;29spec: SoftwareSpec["sagemath"];30inventory: ComputeInventory["sagemath"];31components: ComputeComponents["sagemath"];32execInfo?: { [key: string]: string };33timestamp: string;34}3536export default function SageMath(props: Props) {37const { name, customize, spec, inventory, components, execInfo, timestamp } =38props;3940function renderBox() {41return (42<Alert43style={{ margin: "15px 0" }}44message="Learn More"45description={46<span style={{ fontSize: "10pt" }}>47Learn more about{" "}48<strong>49<A href="/features/sage">50SageMath related functionality in CoCalc51</A>52</strong>53.54</span>55}56type="info"57showIcon58/>59);60}6162function renderInfo() {63return (64<>65<div style={{ width: "50%", float: "right", padding: "0 0 15px 15px" }}>66<Image src={sageScreenshot} alt="SageMath" />67</div>68<Paragraph>69This table lists pre-installed{" "}70<A href="https://www.sagemath.org">SageMath</A> packages that are71immediately available in every CoCalc project running on the default72"Ubuntu {name}" image, along with their respective version numbers.73</Paragraph>74<Paragraph type="secondary">75Note: Besides this default SageMath environment, there are also older76versions available.77</Paragraph>78</>79);80}8182return (83<Customize value={customize}>84<Head title="SageMath in CoCalc" />85<Layout>86<Header page="software" subPage="sagemath" softwareEnv={name} />87<Layout.Content88style={{89backgroundColor: "white",90}}91>92<div style={STYLE_PAGE}>93<Title level={1} style={{ textAlign: "center" }}>94SageMath (Ubuntu {name})95</Title>96{renderInfo()}97{renderBox()}98<ExecutableDescription spec={spec} execInfo={execInfo} />99<SoftwareLibraries100spec={spec}101inventory={inventory}102components={components}103libWidthPct={60}104timestamp={timestamp}105/>106</div>107<Footer />108</Layout.Content>109</Layout>110</Customize>111);112}113114export async function getServerSideProps(context) {115return await withCustomizedAndSoftwareSpec(context, "sagemath");116}117118119